import { Pipe, PipeTransform } from '@angular/core'

@Pipe({
  name: 'encryPhone'
})
export class EncryPhonePipe implements PipeTransform {
  transform(phone: string): any {
    if (phone) {
      return phone.substring(0, 3) + '****' + phone.substring(7, 11)
    } else {
      return ''
    }
  }
}
